Fix redraw issues with the focus on the ring.
authorMatthias Clasen <mclasen@redhat.com>
Sat, 16 Oct 2004 04:27:08 +0000 (04:27 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 16 Oct 2004 04:27:08 +0000 (04:27 +0000)
2004-10-16  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkhsv.c (gtk_hsv_expose): Fix redraw issues with the
focus on the ring.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkhsv.c

index 35c5fd5ec3b4dba0af897feaf06022756a3a0251..b04a2820d2a86b69516d25acc9058ef34876f106 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkhsv.c (gtk_hsv_expose): Fix redraw issues with the
+       focus on the ring. 
+
 2004-10-15  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtksizegroup.c (do_size_request): Unset GTK_REQUEST_NEEDED
index 35c5fd5ec3b4dba0af897feaf06022756a3a0251..b04a2820d2a86b69516d25acc9058ef34876f106 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkhsv.c (gtk_hsv_expose): Fix redraw issues with the
+       focus on the ring. 
+
 2004-10-15  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtksizegroup.c (do_size_request): Unset GTK_REQUEST_NEEDED
index 35c5fd5ec3b4dba0af897feaf06022756a3a0251..b04a2820d2a86b69516d25acc9058ef34876f106 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkhsv.c (gtk_hsv_expose): Fix redraw issues with the
+       focus on the ring. 
+
 2004-10-15  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtksizegroup.c (do_size_request): Unset GTK_REQUEST_NEEDED
index 35c5fd5ec3b4dba0af897feaf06022756a3a0251..b04a2820d2a86b69516d25acc9058ef34876f106 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkhsv.c (gtk_hsv_expose): Fix redraw issues with the
+       focus on the ring. 
+
 2004-10-15  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtksizegroup.c (do_size_request): Unset GTK_REQUEST_NEEDED
index fd812db0d01729de5da7833c918434c1e1146ae4..cb73ecd8fc465d96dafc166903059fad74d1d23d 100644 (file)
@@ -996,7 +996,7 @@ paint_ring (GtkHSV      *hsv,
   
   /* Create clipping mask */
   
-  mask = gdk_pixmap_new (GTK_WIDGET (hsv)->window, width, height, 1);
+  mask = gdk_pixmap_new (widget->window, width, height, 1);
 
   gc = gdk_gc_new (mask);
   
@@ -1068,14 +1068,6 @@ paint_ring (GtkHSV      *hsv,
   g_free (buf);
   
   /* Draw ring outline */
-
-  if (GTK_WIDGET_HAS_FOCUS (hsv) && priv->focus_on_ring)
-    {
-      gtk_paint_focus (widget->style, drawable,
-                      GTK_WIDGET_STATE (widget),
-                      NULL, widget, NULL,
-                      x, y, width, height);
-    }
 }
 
 /* Converts an HSV triplet to an integer RGB triplet */
@@ -1400,6 +1392,15 @@ gtk_hsv_expose (GtkWidget      *widget,
                     dest.y,
                     event->area.width, event->area.height);
   
+  if (GTK_WIDGET_HAS_FOCUS (hsv) && priv->focus_on_ring)
+    gtk_paint_focus (widget->style, widget->window,
+                    GTK_WIDGET_STATE (widget),
+                    &event->area, widget, NULL,
+                    widget->allocation.x,
+                    widget->allocation.y, 
+                    widget->allocation.width, 
+                    widget->allocation.height);
+
   g_object_unref (pixmap);
   
   return FALSE;